home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-05-11 | 983 b | 25 lines | [TEXT/GEOL] |
- Item 4313766 6-May-90 20:21PDT
-
- From: MIKE.VILOT ObjectWare, Michael Vilot,PRT
-
- To: M.DANIEL Daniel Scientific, M Daniel,PRT
-
- cc: CPLUS.APPLE$ C++ Interest List--Apple Employees
- CPLUS.DEV$ C++ Interest List--Developers
-
- Sub: RE>>> copy vs op+ & const
-
- > with "operator int();"
- If you take a look at Jerry Schwarz's Iostream library, you'll
- see that he uses "operator void*()" for this purpose. He also
- defines "operator!()" for the complementary test.
- The main reason for preferring void* over int is that generic
- pointers are not implicitly converted _to_ any other types, as
- are int values (see Sections 4.5 and 4.6 of the Reference Manual).
- This helps to insure that the status test is in fact the point
- of using the implicit conversion in the expression. It also
- preserves "operator int()" for arithmetic conversions.
-
- Mike
-
-